Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/src/packages/next/pages/config/[...page].tsx
Views: 923
/*1* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Layout } from "antd";6import { join } from "path";7import ConfigLayout from "components/account/config/layout";8import Footer from "components/landing/footer";9import Head from "components/landing/head";10import Header from "components/landing/header";11import { Paragraph } from "components/misc";12import A from "components/misc/A";13import basePath from "lib/base-path";14import { Customize } from "lib/customize";15import withCustomize from "lib/with-customize";1617export default function Preferences({ customize, page }) {18function noteAboutConfig() {19return (20<Paragraph21type="secondary"22style={{23padding: "15px",24margin: 0,25textAlign: "center",26borderTop: `1px solid lightgray`,27}}28>29This is the account configuration page.{" "}30<A href={join(basePath, "settings")} external>31You can also adjust preferences in the main app...32</A>33</Paragraph>34);35}3637return (38<Customize value={customize}>39<Head title="Configuration" />40<Layout>41<Header page={"account"} />42<div style={{ margin: "30px", fontSize: "15pt" }}>43<A href="/settings/account">44This page is deprecated. Visit the settings pages instead...45</A>46</div>47<ConfigLayout page={page} />48{noteAboutConfig()}49<Footer />50</Layout>51</Customize>52);53}5455export async function getServerSideProps(context) {56const { params, res } = context;57const { page = [] } = params;5859const [_, sub] = page;60if (sub == null) {61return res.redirect(307, "./search/input");62}6364return await withCustomize({ context, props: { page } });65}666768